Optimal. Leaf size=142 \[ \frac {23 a^4 \cot ^3(c+d x)}{15 d}+\frac {4 i a^4 \cot ^2(c+d x)}{d}-\frac {8 a^4 \cot (c+d x)}{d}+\frac {8 i a^4 \log (\sin (c+d x))}{d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}-8 a^4 x-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.29, antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3553, 3593, 3591, 3529, 3531, 3475} \[ \frac {23 a^4 \cot ^3(c+d x)}{15 d}+\frac {4 i a^4 \cot ^2(c+d x)}{d}-\frac {8 a^4 \cot (c+d x)}{d}+\frac {8 i a^4 \log (\sin (c+d x))}{d}-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}-8 a^4 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3529
Rule 3531
Rule 3553
Rule 3591
Rule 3593
Rubi steps
\begin {align*} \int \cot ^6(c+d x) (a+i a \tan (c+d x))^4 \, dx &=-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {1}{5} \int \cot ^5(c+d x) (a+i a \tan (c+d x))^2 \left (-12 i a^2+8 a^2 \tan (c+d x)\right ) \, dx\\ &=-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}-\frac {1}{20} \int \cot ^4(c+d x) (a+i a \tan (c+d x)) \left (92 a^3+68 i a^3 \tan (c+d x)\right ) \, dx\\ &=\frac {23 a^4 \cot ^3(c+d x)}{15 d}-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}-\frac {1}{20} \int \cot ^3(c+d x) \left (160 i a^4-160 a^4 \tan (c+d x)\right ) \, dx\\ &=\frac {4 i a^4 \cot ^2(c+d x)}{d}+\frac {23 a^4 \cot ^3(c+d x)}{15 d}-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}-\frac {1}{20} \int \cot ^2(c+d x) \left (-160 a^4-160 i a^4 \tan (c+d x)\right ) \, dx\\ &=-\frac {8 a^4 \cot (c+d x)}{d}+\frac {4 i a^4 \cot ^2(c+d x)}{d}+\frac {23 a^4 \cot ^3(c+d x)}{15 d}-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}-\frac {1}{20} \int \cot (c+d x) \left (-160 i a^4+160 a^4 \tan (c+d x)\right ) \, dx\\ &=-8 a^4 x-\frac {8 a^4 \cot (c+d x)}{d}+\frac {4 i a^4 \cot ^2(c+d x)}{d}+\frac {23 a^4 \cot ^3(c+d x)}{15 d}-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}+\left (8 i a^4\right ) \int \cot (c+d x) \, dx\\ &=-8 a^4 x-\frac {8 a^4 \cot (c+d x)}{d}+\frac {4 i a^4 \cot ^2(c+d x)}{d}+\frac {23 a^4 \cot ^3(c+d x)}{15 d}+\frac {8 i a^4 \log (\sin (c+d x))}{d}-\frac {\cot ^5(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{5 d}-\frac {3 i \cot ^4(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 3.40, size = 359, normalized size = 2.53 \[ \frac {a^4 \csc (c) \csc ^5(c+d x) (\cos (4 d x)+i \sin (4 d x)) \left (345 \sin (2 c+d x)-275 \sin (2 c+3 d x)-120 \sin (4 c+3 d x)+79 \sin (4 c+5 d x)+600 d x \cos (2 c+d x)-210 i \cos (2 c+d x)+300 d x \cos (2 c+3 d x)-90 i \cos (2 c+3 d x)-300 d x \cos (4 c+3 d x)+90 i \cos (4 c+3 d x)-60 d x \cos (4 c+5 d x)+60 d x \cos (6 c+5 d x)+960 \sin (c) \sin ^5(c+d x) \tan ^{-1}(\tan (5 c+d x))-30 \cos (d x) \left (-5 i \log \left (\sin ^2(c+d x)\right )+20 d x-7 i\right )-150 i \cos (2 c+d x) \log \left (\sin ^2(c+d x)\right )-75 i \cos (2 c+3 d x) \log \left (\sin ^2(c+d x)\right )+75 i \cos (4 c+3 d x) \log \left (\sin ^2(c+d x)\right )+15 i \cos (4 c+5 d x) \log \left (\sin ^2(c+d x)\right )-15 i \cos (6 c+5 d x) \log \left (\sin ^2(c+d x)\right )+445 \sin (d x)\right )}{120 d (\cos (d x)+i \sin (d x))^4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 218, normalized size = 1.54 \[ \frac {-840 i \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 2220 i \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} - 2620 i \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 1460 i \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} - 316 i \, a^{4} + {\left (120 i \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} - 600 i \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 1200 i \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} - 1200 i \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 600 i \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} - 120 i \, a^{4}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )}{15 \, {\left (d e^{\left (10 i \, d x + 10 i \, c\right )} - 5 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 10 \, d e^{\left (6 i \, d x + 6 i \, c\right )} - 10 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 5 \, d e^{\left (2 i \, d x + 2 i \, c\right )} - d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 46.78, size = 212, normalized size = 1.49 \[ \frac {3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 30 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 155 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 600 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 7680 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right ) + 3840 i \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 2370 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {-8768 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2370 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 600 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 155 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 30 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a^{4}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.36, size = 113, normalized size = 0.80 \[ -8 a^{4} x -\frac {8 a^{4} \cot \left (d x +c \right )}{d}-\frac {8 a^{4} c}{d}+\frac {4 i a^{4} \left (\cot ^{2}\left (d x +c \right )\right )}{d}+\frac {8 i a^{4} \ln \left (\sin \left (d x +c \right )\right )}{d}+\frac {7 a^{4} \left (\cot ^{3}\left (d x +c \right )\right )}{3 d}-\frac {i a^{4} \left (\cot ^{4}\left (d x +c \right )\right )}{d}-\frac {a^{4} \left (\cot ^{5}\left (d x +c \right )\right )}{5 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.81, size = 109, normalized size = 0.77 \[ -\frac {120 \, {\left (d x + c\right )} a^{4} + 60 i \, a^{4} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 120 i \, a^{4} \log \left (\tan \left (d x + c\right )\right ) + \frac {120 \, a^{4} \tan \left (d x + c\right )^{4} - 60 i \, a^{4} \tan \left (d x + c\right )^{3} - 35 \, a^{4} \tan \left (d x + c\right )^{2} + 15 i \, a^{4} \tan \left (d x + c\right ) + 3 \, a^{4}}{\tan \left (d x + c\right )^{5}}}{15 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.27, size = 92, normalized size = 0.65 \[ -\frac {16\,a^4\,\mathrm {atan}\left (2\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )}{d}-\frac {8\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^4-a^4\,{\mathrm {tan}\left (c+d\,x\right )}^3\,4{}\mathrm {i}-\frac {7\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^2}{3}+a^4\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}+\frac {a^4}{5}}{d\,{\mathrm {tan}\left (c+d\,x\right )}^5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.73, size = 218, normalized size = 1.54 \[ \frac {8 i a^{4} \log {\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac {- 840 i a^{4} e^{8 i c} e^{8 i d x} + 2220 i a^{4} e^{6 i c} e^{6 i d x} - 2620 i a^{4} e^{4 i c} e^{4 i d x} + 1460 i a^{4} e^{2 i c} e^{2 i d x} - 316 i a^{4}}{15 d e^{10 i c} e^{10 i d x} - 75 d e^{8 i c} e^{8 i d x} + 150 d e^{6 i c} e^{6 i d x} - 150 d e^{4 i c} e^{4 i d x} + 75 d e^{2 i c} e^{2 i d x} - 15 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________